import React, {useEffect} from "react";
import { Layout } from 'antd';

import SideMenu from "../../components/sandBox/SideMenu";
import TopHeader from "../../components/sandBox/TopHeader";
import NewsRouter from "./news-router/NewsRouter";

import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
import './NewsSandBox.css';


const { Content } = Layout;

export default function NewsSandBox() {

    NProgress.start();  // 每一次渲染开始前调用
    useEffect(()=>{
        NProgress.done();  // 每一次渲染结束后停止
    });

    return (
        <Layout>
            <SideMenu />

            <Layout className="site-layout">

                <TopHeader />

                <Content className="site-layout-background content-container">
                    <NewsRouter />
                </Content>

            </Layout>

        </Layout>
    );
}

